import request from '@/utils/request'

// 获取客户信息
export function getCustomerInfo(id) {
    return request({
        url: `/api/BaseData/Customer/${id}`,
        method: 'GET'
    })
}

// 获取客户信息列表
export function getCustomerList(data) {
    return request({
        url: `/api/BaseData/Customer`,
        method: 'GET',
        data
    })
}

// 添加客户信息
export function createCustomer(data) {
    return request({
        url: '/api/BaseData/Customer',
        method: 'POST',
        data
    })
}

// 更新客户信息
export function updateCustomer(data) {
    return request({
        url: `/api/BaseData/Customer/${data.id}`,
        method: 'PUT',
        data
    })
}

// 批量删除客户信息
export function delCustomerBatch(data) {
    return request({
        url: `/api/BaseData/Customer/BatchRemove`,
        method: 'POST',
        data
    })
}
// 删除客户信息
export function delCustomer(id) {
    return request({
        url: `/api/BaseData/Customer/${id}`,
        method: 'DELETE'
    })
}
// 获取所有客户信息
export function getCustomerAll() {
    return request({
        url: `/api/BaseData/Customer/All`,
        method: 'GET'
    })
}
// 导出客户信息
export function exportData(data) {
    return request({
        url: `/api/BaseData/Customer/Actions/Export`,
        method: 'GET',
        data
    })
}
// 导入
export function ImportData(data) {
  return request({
    url: '/api/BaseData/Customer/ImportData',
    method: 'post',
    data
  })
}
// 导入预览
export function ImportPreview(data) {
  return request({
    url: '/api/BaseData/Customer/ImportPreview',
    method: 'get',
    data
  })
}
// 模板下载
export function TemplateDownload() {
  return request({
    url: '/api/BaseData/Customer/TemplateDownload',
    method: 'get'
  })
}